home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
United Public Domain Gold 2
/
United Public Domain Gold 2.iso
/
utilities
/
pu438.dms
/
pu438.adf
/
RTPatch.doc
< prev
next >
Wrap
Text File
|
1993-07-26
|
16KB
|
389 lines
*********************************
RTPatch 1.1c
The ReqTools Patcher
(c) 1992-1993 Nico François
*********************************
Preface
=======
The programs and files in this distribution are freely distributable, but are
also copyright (c) Nico François. They may be freely distributed as long as
no more than a nominal fee is charged to cover time and copying costs.
No commercial usage is permitted without written permission from the
author. Everything in this distribution must be kept together, in original
unmodified form.
The above is generally known as freeware.
If you have suggestions or remarks about this program, or if you find
any bugs, please let me know.
Contacting the author:
Fido: 2:292/603.10 (Nico Francois)
UUCP: nico@pandora.augfl.be
Mail: Nico François
Corbielaan 13
B-3060 Bertem
BELGIUM
If you can please use e-mail. That way you'll stand a much better chance
of getting a reply quickly.
Contents
========
1. Introduction
2. Usage
3. Compatibility
4. Controlling RTPatch
1. Introduction
===============
RTPatch is a small program that will re-route functions from most popular
requester libraries to ReqTools. Libraries currently supported are Arp, Req
and Asl. RTPatch will also patch some functions in Intuition to give you
improved system requesters.
The patches RTPatch makes are these:
o Intuition : AutoRequest and EasyRequest (on 2.0) are patched so
normal system requesters, like 'Insert Disk...'
requesters, will be replaced by ReqTools EZRequesters.
They will appear near the mouse pointer and respond to
many keyboard shortcuts. On 2.0 OpenScreenTagList() is
also patched to always open a new-look 3D screen. This
will make for example CygnusEd 2.12 open a nice new-look
screen. You may also ask RTPatch to patch OpenScreen()
to open _all_ screens with a 3D look. Beware however
that this makes a lot of old programs look ugly!
o req.library: File requester, font requester, palette requester,
string requester and integer requester are replaced by
ReqTools requesters.
o arp.library: File requester is replaced by ReqTools file requester.
o asl.library: Currently only file requester is replaced by ReqTools
file requester. Font and screen mode requesters are not
patched yet.
RTPatch uses an intelligent patch mechanism. It will only patch a
library when it is actually opened. This means that if you never use the
arp.library (for example) it will not be patched and, more importantly, it
will not unnecessaryly be loaded into memory! If you do run a program that
uses Arp and you quit it, it will close Arp. RTPatch will then allow the
patched Arp to be expunged from memory. If Arp is reloaded again later it
will be re-patched. Note that RTPatch patches exec.library/OpenLibrary() and
exec.library/OldOpenLibrary() to accomplish all this.
RTPatch is a 100% assembly program, for maximum efficiency. It only
takes about 4.5K of memory once installed (excluding memory occupied by
reqtools.library). It uses *NO* processor time while installed.
2. Usage
========
RTPatch can be used from Workbench and from the Shell (CLI).
Shell usage:
~~~~~~~~~~~~
RTPatch 1.1c © 1992-1993 Nico François
Usage: RTPatch [NOREQ] [NOASL] [NOARP] [NOINTUITION]
[OPENSCRPATCH] [NOOPENSCRTAGPATCH]
Explanation of options:
NOREQ : Do not patch req.library.
NOASL : Do not patch asl.library.
NOARP : Do not patch arp.library.
NOINTUITION : Do not patch intuition.library.
OPENSCRPATCH : Patch OpenScreen() in intuition.library so _all_
screens will open with a 3D look. Only use this
option on Kickstart 2.0 and higher!
NOOPENSCRTAGPATCH : Do not patch OpenScreenTagList() in
intuition.library.
Workbench usage:
~~~~~~~~~~~~~~~~
RTPatch recognizes following tooltypes:
NOREQ : Do not patch req.library.
NOASL : Do not patch asl.library.
NOARP : Do not patch arp.library.
NOINTUITION : Do not patch intuition.library.
OPENSCRPATCH : Patch OpenScreen() in intuition.library so _all_
screens will open with a 3D look. Only use this
tooltype on Kickstart 2.0 and higher!
NOOPENSCRTAGPATCH : Do not patch OpenScreenTagList() in
intuition.library.
QUIET : Don't open requester informing patches have been
installed. Set this tooltype if you intend to drag
RTPatch to your WbStartup drawer.
NOTE: Run RTPatch when *NO* program has req.library, asl.library or
arp.library open! RTPatch will complain if one of these libraries
is in use and will refuse to install or remove patches. Running
RTPatch in your user-startup or from your WbStartup should be ok.
WARNING: Asl V38 (distributed with Workbench 2.1) always keeps its library
open count at 0. It does this so ramlib will always call its
Expunge() function when memory is low. This does however mean
RTPatch cannot see if this library is in use or not. So you must
be very careful not to install or remove RTPatch when you have a
program running that uses Asl. If you are still using Workbench 1.3
or 2.0 there is no problem.
3. Compatibility
================
RTPatch supports all basic requester functions and options. Other
supported things that are worth mentioning:
arp.library (V39)
~~~~~~~~~~~~~~~~~
o File callback function (FRF_DoWildFunc). The A4 global data register
is valid when this callback function is called (documented feature).
o Message callback function (FRF_DoMsgFunc) for requesters which share
their IDCMP port with the parent window.
o Save mode (FRF_DoColor flag).
o Shared IDCMP with parent window or new IDCMP (FRF_NewIDCMP flag).
o 'Empty filename is ok' behaviour is supported.
asl.library (V36/V38)
~~~~~~~~~~~~~~~~~~~~~
o File callback function/hook (FRF_DOWILDFUNC and ASLFR_FilterFunc tag).
The A4 global data register is valid when this callback function is
called for maximum compatibility (undocumented feature of Asl V36).
o Intuition message callback function/hook (FRF_DOMSGFUNC and
ASLFR_IntuiMsgFunc tag) for requesters with shared IDCMP.
o Multi-selection (FRB_DOMULTISELECT flag or ASLFR_DoMultiSelect tag).
o Directory requester, no files. (FRF_DRAWERSONLY flag or
ASLFR_DrawersOnly tag).
o Save mode (FRF_DOSAVEMODE flag or ASLFR_DoSaveMode tag).
o Shared IDCMP with parent window or new IDCMP (FRF_PRIVATEIDCMP flag
or ALSFR_PrivateIDCMP tag).
o Putting to sleep of parent window (ASLFR_SleepWindow tag).
o Font for requester (ASLFR_TextAttr tag). Note that if a proportional
font is supplied it will be rejected by the ReqTools file requester.
o Pattern gadget (FRF_DOPATTERNS flag or ASLFR_DoPatterns tag).
o 'Empty filename is ok' behaviour is supported to ensures compatibility
with e.g. AssignX, PageStream 2.2 and no doubt many other programs.
o Undocumented fields in file requester structure are filled in, so even
"dirty" programs will work.
o Accept and reject patterns (ASLFR_AcceptPattern/ASLFR_RejectPattern).
req.library (V2)
~~~~~~~~~~~~~~~~
o Multi-selection.
o Buffers for file and font requester.
o Directory requester (no files).
o Save mode (FRQSAVINGM flag).
o Minimum and maximum value of GetLong() requester.
Additional enhancements
~~~~~~~~~~~~~~~~~~~~~~~
o Buffered directories for Asl file requester.
Following things are NOT supported (yet?):
¯¯¯
arp.library
~~~~~~~~~~~
o FRF_NewWindFunc and FRF_AddGadFunc/FRF_GEventFunc callback functions
are not called. As far as I can tell nobody ever used the latter two
and the former function is certainly not used a lot.
In short: this should not pose any problems.
asl.library
~~~~~~~~~~~
o ASLFR_InitialWidth and ASLFR_NegativeText tags are ignored.
o FRB_REJECTICONS flag and ASLFR_RejectIcons tag are ignored.
o FRB_FILTERDRAWERS flag and ASLFR_FilterDrawers tag are ignored.
req.library
~~~~~~~~~~~
o Timeout and abort mask (req.library requester will be used).
o freq->frq_Hide is ignored (freq->frq_Show is however supported).
o TR_KeyMask is not completely supported. If it is not 0xffff
(no qualifers) the requester will only respond to Left Amiga V/B.
This should suffice in most cases however.
If you find any compatibility problems let me know. Please give a detailed
description of the problem. Not 'RTPatch doesn't work with NeatProg',
but more like: 'when I do this and this in NeatProg ... doesn't work".
4. Controlling RTPatch
======================
From version 1.1 on RTPatch's message port can be used to control certain
patches from an external program.
The message port is called 'RTPatch.rendezvous' and looks like this:
struct RTPatchPort {
/* PRIVATE FIELDS */
struct MsgPort rtport_port;
ULONG rtport_version;
/* PUBLIC */
UWORD rtport_easyreqautocancel;
UWORD rtport_skipeasyreqpatch;
UWORD rtport_skipopenscrpatch;
};
Set the rtport_autocancel field to non-zero to make easy requesters cancel
themselves automatically. The rtport_skipeasyreqpatch field can be used to
temporarily disable the patch for EasyRequestArgs(). Note that the
rtport_easyreqautocancel field will be ignored if the rtport_skipeasyreqpatch
field is non-zero (TRUE). RTPatch must have been installed _without_ the
NOINTUITION argument (default).
Set the rtport_skipopenscrpatch field to non-zero to temporarily disable
the OpenScreen() patch. This will of course only work if the OPENSCRPATCH
argument was used (not the default!).
To change these fields simply do a FindPort() for 'RTPatch.rendezvous' and
change the fields like this:
Forbid();
if (rtport = (struct RTPatchPort *)FindPort ("RTPatch.rendezvous")) {
rtport->rtport_easyreqautocancel = TRUE;
}
Permit();
if (!rtport) Message ("RTPatch not found!");
else Message ("Easy requesters will now be canceled!");
Note that you absolutely _must_ use the Forbid()/Permit() pair since
RTPatch can quit at any time.
Enjoy.
PROGRAM HISTORY:
*****************************************************************************
RELEASE 0.9ß
o First BETA release.
*****************************************************************************
RELEASE 0.91ß
o Bug fixes: Req GetLong requester no longer returns FALSE when you enter
the value 0 and Req file requester now properly returns full pathname.
o Now correctly patches AutoRequest when run on Kickstart 1.2/1.3.
*****************************************************************************
RELEASE 1.0
o First "real" release, big improvement over previous beta versions.
o Fixed some small bugs.
o Now only patches libraries when they are actually opened. This saves
oodles of memory, especially when you never or rarely use certain
libraries! Also allows patched libraries to be expunged from memory
unlike many other patchers.
o In conjunction with ReqTools V38 empty directories are now allowed for
improved compatibility. This makes it e.g. possible to use AssignX.
o Asl (V36-V38) library is now also patched (file requester only).
o Command line arguments/icon tooltypes to set some options.
*****************************************************************************
RELEASE 1.0a
o ASLFR_AcceptPattern and ASLFR_RejectPattern tags are now supported.
o Req TextRequest() patch now handles textrequests without gadgets.
An 'Ok' gadget will be added by RTPatch.
o Bug fixed: Asl callback hook (filter function) is now only called for
files, not for directories as well. The callback hook also makes
sure the fr_Drawer field of the Asl requester is pointing to the
current directory (only with ReqTools release 2.0b or higher!).
o Now allows you to also patch OpenScreen() to force _all_ screens to
open with a 3D look. This is not default because it makes a lot of old
programs look ugly.
WARNING: NOOPENSCRPATCH switch has been changed to NOOPENSCRTAGPATCH!
o OpenScreenTagList() patch tweeked a bit.
o On Kickstart 2.0 or higher RTPatch will now set the RNF_WILDSTAR flag
in the DOS rootnode. This allows you to use '*' as a wildcard.
*****************************************************************************
RELEASE 1.0b
o OpenScreenTagList() patch tweeked a bit more :) Will not force a 3D
look if no taglist was supplied. Will also leave the picking of the
pens completely up to Intuition. Patch made more future-compatible :)
o Bug fix: Arp message callback function didn't work. This caused TxEd
Plus 2.2 to crash. Thanks to Bill Sorensen for reporting this bug.
o Fixed problem with AutoRequest() and EasyRequest() patches. Requesters
weren't opened on the default public screen if the window argument was
NULL. They were opened on the screen of the window in pr_WindowPtr.
Thanks to Roger Nordin for reporting this.
*****************************************************************************
RELEASE 1.1
o RTPatch's message port is now documented and allows external program
to change the behaviour of some patches. It is now possible to let
RTPatch automatically cancel easy requesters and to temporarily switch
off the OpenScreen() patch.
o Bug fix: OpenScreen() patch now recognizes the NS_EXTENDED flag.
Fixes problems with DPaint, DirOpus and PowerVisor.
o Handling of ASLFR_DrawersOnly tag was broken. Fixed.
o Fixed bug in AutoRequest() patch (no longer worked on Kickstart 1.3).
o OpenLibrary() patch rewritten for (hopefully) better compatibility
with buggy programs. Now keeps _all_ registers 100% compatible with
normal OpenLibrary() call.
*****************************************************************************
RELEASE 1.1a
o Clears EZREQF_NORETURNKEY for single-button EZRequesters (latest
release of ReqTools libraries no longer clear this automatically).
*****************************************************************************
RELEASE 1.1b
o Now properly initializes the fr_Pattern field of an emulated Asl
file requester structure.
o Fixed bug in req.library TextRequest() emulation. Printf style
arguments were not correctly emulated. This does not fix the infamous
CygnusEd bug that occurs when a search for '%s' fails (for example).
o Fixed small bug in single-button detection code in req.library
TextRequest() emulation.
*****************************************************************************
RELEASE 1.1c
o CloseLibrary() patch fixed. Now checks the return code from
SetFunction() rather than directly peeking into the library's jump
table. Should work perfectly with SetMan now.
*****************************************************************************
RTPatch 1.1c written by Nico François (Yes, Nico is my first name :-)
"Is that you Mo-Dean?
It's me Mo-Dean
The Interdimensional outer space being" - The B-52's
(c) 1992-1993 Nico François
//
Thanks to \X/ Amiga for being the best computer ever!